/*
	Burrows-Wheeler transformation class
	------------------------------------

	data transformation algorithm

	Remarks:
	But the authors of the BWT, Michael Burrows and David Wheeler
	recommended that data should be crunched in such an order:
	Data -> (maybe a simple RLE cruncher ->) BWT -> MTF -> Huffman or Arithmetic Cruncher

	This is just a translation of Mark Nelson's BWT implementation into my coding style
	and win32.
	The encoder allocates an own buffer for the output. The decoder too. The
	output buffers must be freed with the delete keyword !

	by yoda

*/

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <windows.h>

//
// BWT class
//
class BWT  
{
public:
	static BOOL Encode( IN PBYTE buffer, IN DWORD cb, OUT void* &outbuffer, OUT DWORD &cbOut );
	static BOOL Decode( IN PBYTE buffer, IN DWORD cb, OUT void* &outbuffer, OUT DWORD &cbOut );
};
